// pages/account-book/childCpns/create-books/create-books.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    selected: 1, //默认选择账本
    selectedColor: "#FF9909",
    books: [
      {
        name: "创建AA制账本",
        path: "/pages/account-book-a/account-book-a"
      },
      {
        name: "创建流水账本",
        path: "/pages/account-book-w/account-book-w"
      },
    ]
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleClick(e){
      console.log(e.currentTarget.dataset)
      const index = e.currentTarget.dataset.index
      const path = e.currentTarget.dataset.path
      
      this.setData({
        selected: index
      })
      
      wx.navigateTo({
        url: path,
      })
    }
  }
})
